package com.demohomework.homeworkdemo.pojo;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.time.LocalDateTime;
@Data
// 课程实体类
public class Course {
    // 记录的唯一标识符
    @NotNull(groups = { Update.class})
    private int id;
    @NotEmpty(groups = { Add.class, Update.class})
    // 课程名称
    private String name;
    private String image;// 课程图片
    // 课程学分
    @NotNull(groups = { Add.class, Update.class})
    private int credit;

    //授课教师id
    private String teacherId;
    //是否开课
    private int isOpen; // 0：未开课 1：已开课
    // 创建时间
    private LocalDateTime createAt;

    // 更新时间
    private LocalDateTime updateAt;

    public interface Add{

    }

    public  interface   Update{

    }
}

